package com.googlecode.classgrep.info;

import java.lang.annotation.Annotation;
import java.lang.reflect.AnnotatedElement;
import java.util.ArrayList;
import java.util.List;

public class Annotatable {
	
	private final List<AnnotationInfo> annotations = new ArrayList<AnnotationInfo>();

	public Annotatable(AnnotatedElement element) {
		for (Annotation annotation : element.getAnnotations()) {
			annotations.add(new AnnotationInfo(annotation.annotationType().getName()));
		}
	}

	public Annotatable() {
	}

	public List<AnnotationInfo> getAnnotations() {
		return annotations;
	}

}